import { CpcBase, ICpcBaseIos } from "../base/CpcBase";

const ios: ICpcBaseIos = {
    inputs: [],
    outputs: [
        {
            name: "输出的数据",
            type: 0,
        },
    ],
};

export class CpcString extends CpcBase {
    public title = "创建字符串";

    public desc = "创建字符串";

    public type = "CpcString";

    public properties = {
        preDatas: [""],
    };

    constructor(title?: string) {
        super(ios, title);
        this.addWidget("text", "text", this.properties.preDatas[0], v => {
            this.properties.preDatas[0] = v;
        });
    }

    cpcRunCode(preDatas: any[], inputInfos: any[], outputInfos: any[]): any[] {
        return preDatas;
    }
}
